﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Reflection.Emit;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace TimeClock
{
    public partial class FullWindow : Form
    {
        private ConfigWindow configWindow;
        public FullWindow(ConfigWindow configWindow)
        {
            InitializeComponent();
            this.configWindow = configWindow;
        }

        private void FullWindow_Load(object sender, EventArgs e)
        {
            label1.BackColor = Color.Transparent;
            
            int screenWidth = Screen.PrimaryScreen.Bounds.Width;
            int screenHeight = Screen.PrimaryScreen.Bounds.Height;
            int x = (screenWidth - label1.Width) / 2;
            int y = (screenHeight - label1.Height) / 2;
            label1.Location = new Point(x,y);
            Width = screenWidth;
            Height = screenHeight;
            this.StartPosition = FormStartPosition.Manual;
            this.Left = 0;
            this.Top = 0;

        }
        private void close_page()
        {
            configWindow.timer_start();
            Close();
        }

        private void FullWindow_Click(object sender, EventArgs e)
        {
            close_page();
        }

        private void label1_Click(object sender, EventArgs e)
        {
            close_page();
        }
    }
}
